[#38] Add Farcaster sharing, meta tags, and OG image#148
Conversation
- ShareToFarcaster client component: detects mini app context via SDK, calls sdk.actions.composeCast() with story URL embed - generateMetadata on story pages: OG tags + fc:miniapp meta tag with launch_miniapp action pointing back to story URL - Dynamic OG image route at /story/[storylineId]/og: 1200x800 (3:2) showing title, writer address, and plot count Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
project7-interns
left a comment
There was a problem hiding this comment.
Verdict: REQUEST CHANGES
Summary
The share button and metadata scaffolding are in place, but the embed metadata does not yet satisfy the issue requirements.
Findings
- [high] Issue #38 requires story pages to include Farcaster embed metadata for story title, current price, plot count, and writer name. The new metadata/OG implementation only includes title, writer, and plot count.
generateMetadata()builds a description from writer + plot count only, and the dynamic OG image renders title + writer + plot count only. There is no current price in the embed metadata or generated image.- File:
src/app/story/[storylineId]/page.tsx:38 - Suggestion: fetch the current token price for the storyline and include it in the Farcaster/OG metadata payload.
- File:
src/app/story/[storylineId]/og/route.tsx:84 - Suggestion: render the current price in the generated 1200x800 image alongside the other story stats.
- File:
Decision
Requesting changes because the PR does not yet meet issue #38's acceptance criteria for embed metadata content.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
project7-interns
left a comment
There was a problem hiding this comment.
T2b Review: REQUEST CHANGES
Well-structured PR — SDK context gating, OG tags, and image generation all look correct. One functional bug:
Blocking
lineClamp: 3not supported by Satori —next/ogImageResponseuses Satori for rendering, which doesn't supportlineClamp/-webkit-line-clamp. Long titles will overflow the OG image. Fix by truncating in JS:
const displayTitle = sl.title.length > 80 ? sl.title.slice(0, 77) + "..." : sl.title;Non-blocking
- No explicit caching headers on OG image route — consider
export const revalidate = 3600orCache-Controlheader. ShareToFarcasterre-imports SDK on every click — consider storingsdkref from the initialuseEffect.- No XSS risks —
ImageResponserenders to PNG (rasterized text), meta tags are escaped by Next.js.
project7-interns
left a comment
There was a problem hiding this comment.
T2b Re-review: APPROVE
lineClamp replaced with JS string truncation — Satori-compatible. Title capped at 80 chars with ellipsis. Clean fix.
project7-interns
left a comment
There was a problem hiding this comment.
Verdict: APPROVE
Summary
The PR now includes the required Farcaster sharing flow, embed metadata, and dynamic OG image content for story pages. The missing current-price metadata is fixed and the OG image fallback is compatible with next/og.
Findings
- [info] No blocking findings.
Decision
Approving because the implementation now matches issue #38 and lint-and-typecheck passed.
Summary
Fixes #38
sdk.actions.composeCast()with pre-filled text and story URL embed. Only visible inside Farcaster.fc:miniappmeta tags: AddedgenerateMetadatato story pages emittingfc:miniappJSON withlaunch_miniappaction, plus standard OG tags./story/[storylineId]/oggenerating a 1200x800 (3:2) image with story title, writer address, and plot count usingnext/ogImageResponse.Test plan
fc:miniappmeta tag in page source/story/1/og— confirm 1200x800 PNG renders with story metadata🤖 Generated with Claude Code